import Vue from 'vue'
import VueRouter from 'vue-router'
import HomePage from '../views/HomePage.vue'
import Classify from '../views/Classify.vue'
import Order from '../views/Order.vue'
import My from '../views/My.vue'
import Anime from '../views/Anime.vue'
import Gaoxiao from '../views/second/Gaoxiao.vue'
import Rexue from '../views/second/Rexue.vue'
import Tuili from '../views/second/Tuili.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomePage
  },
  {
    path: '/home',
    name: 'home',
    component: HomePage
  },
  {
    path: '/classify',
    name: 'classify',
    component: Classify,
  },
  {
    path: '/order',
    name: 'order',
    component: Order
  },
  {
    path: '/my',
    name: 'my',
    component: My
  },
  {
    path: '/anime',
    component: Anime,
    children: [
      {
        path: 'gaoxiao',
        component: Gaoxiao
      },
      {
        path: 'rexue',
        component: Rexue
      },
      {
        path: 'tuili',
        component: Tuili
      },
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
